import tagRender from "@/components/aggridCellRenDerer/tagRender.vue";

const tableColumns3 = [
    {
        field: '',
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '机台',
        field: 'machineCode',
        width: 150
    },
    {
        headerName: '洗机日期',
        field: 'empStartTime',
        width: 150
    },
    {
        headerName: '调机类型',
        field: 'maintainType',
        width: 150
    },
    {
        headerName: '调机单号',
        field: 'adjustmentCode',
        width: 150
    },
    {
        headerName: '坯布编号',
        field: 'greyCode',
        width: 150
    },
    {
        headerName: '织布单号',
        field: 'planOrderCode',
        width: 150
    },
    {
        headerName: '状态',
        field: 'adjustmentState',
        width: 150,
        cellRenderer: tagRender,
        cellRendererParams: {
            styleClass: (params: any) => {
                return params.adjustmentState == 0
                    ? 'info'
                    : params.adjustmentState == 1
                        ? 'success'
                        : params.adjustmentState == 2
                            ? 'warning'
                            : params.adjustmentState == 3
                                ? 'success'
                                : params.adjustmentState == 4
                                    ? 'info' : ''
            },
            text: (params: any) => {
                return params.adjustmentState == 0
                    ? '未派工'
                    : params.adjustmentState == 1
                        ? '已派工'
                        : params.adjustmentState == 2
                            ? '已开始调机'
                            : params.adjustmentState == 3
                                ? '调机回馈录入'
                                : params.adjustmentState == 4
                                    ? '已结束调机' : ''
            },
            eltagSize: 0,
        },
    },
]

export default tableColumns3